home *** CD-ROM | disk | FTP | other *** search
/ PC Media 22 / PC MEDIA CD22.iso / share / udos / disp186a / doc / display.doc < prev    next >
Text File  |  1994-09-27  |  39KB  |  887 lines

  1.     DDDD      III       SSSS    PPPP     LL           AAAA     YY      YY
  2.     DDDDD     III     SSSSSS    PPPPPP   LL         AAAAAAAA    YY    YY
  3.     DD  DD    III    SSS        PP  PP   LL         AA    AA     YY  YY
  4.     DD   DD   III    SSSSS      PPPPPP   LL         AA    AA      YYYY
  5.     DD   DD   III      SSSSS    PPPP     LL         AAAAAAAA       YY
  6.     DD  DD    III        SSS    PP       LL         AA    AA       YY
  7.     DDDDD     III    SSSSSS     PP       LL         AA    AA       YY
  8.     DDDD      III    SSSS       PP       LLLLLLLL   AA    AA       YY
  9.  
  10.  
  11.                               Program written by
  12.                  Jih-Shin Ho (u7711501@bicmos.ee.nctu.edu.tw)
  13.  
  14.                              Document written by
  15.                  Jih-Shin Ho (u7711501@bicmos.ee.nctu.edu.tw)
  16.                                      and
  17.                  Oliver Weyand (chbrin3@nyx.uni-konstanz.de)
  18.  
  19.                              Document modified by
  20.                     Ben Jos Walbeehm (Walbeehm@fsw.ruu.nl)
  21.  
  22.  
  23.          Copyright (C) 1993-1994 by Jih-Shin Ho. All rights reserved.
  24.  
  25.    !!!  Permission to use and distribute DISPLAY(Executable format)     !!!
  26.    !!!  for any purpose and without fee is hereby granted, provied      !!!
  27.    !!!  that you don't make profit from DISPLAY directly. That is, you  !!!
  28.    !!!  can use DISPLAY to create things you like and sell them, but    !!!
  29.    !!!                                                                  !!!
  30.    !!!                   you CAN'T sell DISPLAY.                        !!!
  31.    !!!                                                                  !!!
  32.    !!!  For BBS and software distribution sites, some handling charge   !!!
  33.    !!!  is allowed.                                                     !!!
  34.  
  35.    !!! This software is provided "as is" without express or implied     !!!
  36.    !!! warranty. The author is not responsible for any damage caused by !!!
  37.    !!! this program.                                                    !!!
  38.  
  39.  
  40. Table of Contents:
  41. ------------------
  42.      (1)  Introduction
  43.      (2)  General Notes
  44.      (3)  Supported Formats
  45.      (4)  Command Line Switches
  46.      (5)  Function Keys
  47.      (6)  Mouse Buttons
  48.      (7)  Initialization step
  49.      (8)  Detail
  50.      (9)  Special Effects
  51.      (10) Tech. information
  52.      (11) About the author
  53.      (12) Final
  54.  
  55.  
  56. (1) Introduction
  57. ================
  58.  
  59.   This program lets you READ, WRITE and DISPLAY images/movies with different
  60.     formats. It lets you do some special effects (rotation, dithering, ...)
  61.     on images as well.
  62.   Features:
  63.     Includes simple file management system.
  64.     Supports 'slide show', 'batch conversion', 'contact sheet making',
  65.              'image preview'.
  66.     There is NO LIMIT on image size.
  67.     This program supports 8, 15, 16, 24 bits display.
  68.     Supports movie files (DL, FLI/FLC, RAW, MPEG, AVI, GL, IFF/ANIM).
  69.     Supports FLC making.
  70.     Supports mouse.
  71.  
  72.   This Program is MEMORY-GREEDY. If you do not have enough memory, its
  73.   performance is poor.
  74.  
  75.   The official site is NCTUCCCA.edu.tw:/PC/graphics/disp.
  76.   The IP address is 140.111.1.10 or 192.83.166.10
  77.  
  78.  
  79. (2) General Notes
  80. =================
  81.  
  82.   Line begins with '+' is newly added/modified after last version.
  83.   Resources/parameters are in config file, config.dis. This file is read when
  84.   DISPLAY starts up.
  85.   You can use text editor to edit config.dis.
  86.   If you encounter something unknown, please read display.faq and config.dis.
  87.  
  88.  
  89. (3) Supported Formats
  90. =====================
  91.  
  92.   Read: GIF(.gif), Japan MAG(.mag), Japan PIC(.jpc), Sun Raster(.ras),
  93.         Jpeg in Jfif(.jpg), XBM(.xbm), Utah RLE(.rle), PBM(.pbm), PGM(.pgm),
  94.         PPM(.ppm), PM(.pm), PCX(.pcx), Japan MKI(.mki), Tiff(.tif),
  95.         Targa(.tga), XPM(.xpm), Mac Paint(.mac), GEM/IMG(.img),
  96. +       IFF/ILBM/PBM(.iff,.lbm), Windows BMP(.bmp), QRT ray tracing(.qrt),
  97.         Mac PICT(.pct), VIS(.vis), PDS(.pds), VIKING(.vik), VICAR(.vic),
  98.         FITS(.fit), Usenix FACE(.fac), IRIS(.sgi), YUV(.yuv), RAW RGB(.rgb),
  99.         PCPAINT/Pictor(.pic,.clp), RAW GREY(.gry), Photo-CD(.pcd),
  100. +       VORT output(.pix), WordPerfect Graphics(.wpg), Windows ICON(.ico).
  101.  
  102.         DL(.dl), FLI(.fli), FLC(.flc), RAW(.raw, produced by DMPEG),
  103.         MPEG(.mpg), AVI(.avi), GL(.gl), IFF/ANIM(.anm).
  104.  
  105.         the extensions in () are standard extensions.
  106.  
  107.   Write: GIF, Sun Raster, Jpeg, XBM, PBM, PGM, PPM, PM, Tiff, Targa,
  108.          XPM, Mac Paint, Ascii, Laser Jet, IFF/ILBM, Windows BMP,
  109.          Mac PICT, VIS, FITS, FACE, PCX, GEM/IMG, IRIS, YUV, RAW RGB,
  110. +        Postscript, RAW GREY, Wordperfect Graphics., Windows ICON.
  111.  
  112.   Preview: GIF, Jpeg, Windows BMP, PBM, PGM, PPM, Targa, PCX, Mac Paint,
  113.            Photo-CD.
  114.  
  115.   All Read/Write formats support full color(8 bits), grey scale, b/w dither,
  116.   and 24 bits image, if allowed for that format.
  117.  
  118.  
  119. (4) Command Line Switches
  120. =========================
  121.  
  122.   DISPLAY understands several command-line parameters. Some of them are
  123.   useful for setting up your preferred configuration or overwriting
  124.   config.dis options. Others are for command-line processing.
  125.  
  126.   Symbol :
  127.     aaa | bbb : You can use aaa or bbb. They are equivalent.
  128.     [ aaa ]   : aaa is optional.
  129.     ( aaa )   : You must use aaa.
  130.     < aaa >   : Use other value or string to replace aaa.
  131.  
  132.   (a) For normal use :
  133.     display [-d|--display <initial_display_type>] [-s|--sort <sort_method>]
  134.             [-f <config_file>] [-a] [-n l|g] [--help|-?]
  135.             [--target|-t <working_directory>] [--mask|-m 'filename_mask']
  136.             [--report|-r <report_file>]
  137.  
  138.     initial_display_type: 8 (SVGA, default), 15, 16 (HiColor), 24 (TrueColor)
  139.     sort_method: 'name', 'ext'.
  140.     -f: Read user specified config file only.
  141.     -a: Always set to highest display type
  142.     -n: Do not read Local or Global config file.
  143.         Global: where DISPLAY.EXE resides. Local: where you start DISPLAY.
  144.     -t: change to the specified directory when DISPLAY starts up.
  145.     filename_mask: separated by ';'. quotation marks are needed before and after
  146.       filename_mask.
  147.     report_file: For batch_contact_sheet_script only. Please don't use relative
  148.       path(e.g.: ../qqq/report).             
  149.  
  150.   (b) For command-line image viewing :
  151.     display [--width|-w <image_width>] [--height|-h <image_height>] image_file
  152.  
  153.     -w & -h: for image format without information header(YUV,RGB,GREY).
  154.  
  155.   (c) For command-line batch conversion :
  156.     display (--batch | -b) output_format [--bw|--grey|--color|--true]
  157.             [--dialog | -g] [--report|-r <report_file>]
  158.             (input_file | input_file output_directory | input_file output_file |
  159.              input_files output_directory)
  160.  
  161.     output_format: Standard extensions. Like gif, bmp ... (see section (6))
  162.     bw,grey,color,true: B/W dither, Grey scale, 8bit full color, 24bit
  163.       true color.
  164.     The default color type for batch conversion is 8bit full color.
  165.     -g: DISPLAY will let you change the setting of output_format if there
  166.         is any.
  167.  
  168.   (d) For command-line slide show :
  169.     display [--slide|-l] [--noask|-k] (image_files | @response_file)
  170.  
  171.     -l: Tell DISPLAY you want slide show.
  172.     -k: Don't ask any question, start slide show immediately.
  173.     response_file: read display.faq.
  174.  
  175.   (e) For command-line contact sheet generation :
  176.     display (--sheet|-e) batch_contact_sheet_script [--report|-r <report_file>]
  177.  
  178.     for the batch_contact_sheet_script format, read display.faq.
  179.  
  180.  
  181.   Please read display.faq for the information not mentioned here.
  182.  
  183.  
  184.  
  185. (5) Function Keys
  186. =================
  187.  
  188.     Escape : Abort function and return.
  189.     RETURN : Select.
  190.  
  191.   (a) In menu selection :
  192.     ESCAPE,F10 : Quit program (prompted).
  193.     ALT-X      : Quit program without prompting.
  194.     F1         : Show DISPLAY.DOC.
  195.     CTRL-F1    : Show user-defined help file. (read config.dis)
  196.     F4         : Change parameters.
  197.     ALT-Z      : Shell to DOS.
  198.     F9         : For those who cannot remember all commands of DISPLAY.
  199.  
  200.     t,T   : Tag file. (Untags tagged files)
  201.     +     : Tag a group of files. (See match.doc)
  202.     ALT-T : Tag all files.
  203.     u,U   : Untag file.
  204.     -     : Untag a group of files. (See match.doc)
  205.     ALT-U : Untag all files.
  206.  
  207.     CTRL-A -- CTRL-Z : Change disk drive.
  208.     F2     : Change disk drive.
  209.     F3     : Change filename masks. (Separated by ';') (See match.doc)
  210.     F7     : Make Directory.
  211.     F6,m,M : Move file(s).
  212.     ALT-M  : Move single file (ignore tags).
  213.     F8,d,D : Delete file(s).
  214.     ALT-D  : Delete single file (ignore tags).
  215.     r,R    : Rename file.
  216.     c,C    : Copy File(s).
  217.     ALT-C  : Copy single file (ignore tags).
  218.     ALT-A  : Re-read directory. Keep current description entries.
  219.     ALT-B  : Re-read directory. Discard current desciption entries.
  220.     ALT-S  : Save config file.
  221.     BACKSPACE : Go up one level in the directory tree.
  222.  
  223.     F5  : Some effects on pictures, e.g. flip, rotate ...
  224.     z,Z : Display first 10 bytes of file in Ascii, Hex and Dec modes.
  225.     f,F : Display disk free space.
  226.     s,S : Slide Show (shows tagged files). ESCAPE to terminate.
  227.     b,B : Batch conversion (converts tagged files to a single format).
  228.           You can perform up to 8 special operations.
  229.           Each is independent of the others.
  230.     e,E : Contact sheet making.
  231.     q,Q : Accumulation color quantization.
  232.           Finds the best palette set for a group of files.
  233.           Very useful for producing animation pictures. (read display.faq)
  234.     l,L : List available graphic/text modes.
  235.     o,O : Display font.
  236.     v,V : View text file.
  237.     x,X : View binary file.
  238.  
  239.     Ins   : Change display type (8, 15, 16, 24 bits).
  240.     Del   : Change display resolution.
  241.     TAB   : In mode selection screen : Change process target. (read display.faq)
  242.             In file selection screen : Show previously loaded image.
  243.     w,W   : Write previously loaded image.
  244.     p,P   : Turn preview on/off.
  245.     ALT-E : Edit description entry. (see display.faq)
  246.     ALT-W : Write description entries. (see display.faq)
  247.     Page Up/Down : Move one page.
  248.     Left/Right arrow : Change display type In 'screen' & 'effects' menu.
  249.     0..9 :
  250.     SHIFT-A..Z : Jump to first file whose name starts with this character.
  251.  
  252.  
  253.   (b) In graphics mode :
  254.     RETURN,SPACE,ESCAPE : return to the text mode.
  255.     + : Go to next resolution.
  256.     - : Go to previous resolution.
  257.     Arrow keys, Home, End, Page Up, Page Down : Scroll image.
  258.       Home: Left-most.
  259.       End: Right-most.
  260.       Page Up: Top of image.
  261.       Page Down: Bottom of image.
  262.     CTRL-Arrow keys: Crop image by one line.
  263.     CTRL-SHIFT-Arrow keys: Big Crop (Controlled by resource 'big_crop_step').
  264.     F1 .. F8 : Gamma correction.
  265.       F1,F3,F5,F7: decrease Red,Green,Blue,All.
  266.       F2,F4,F6,F8: increase Red,Green,Blue,All.
  267.     F9,F10 : Zoom Out/In.
  268.     ALT-Z : Pop out graphic menu.
  269.       SPACE to close.
  270.     ALT-E : Edit description entry.
  271.  
  272.  
  273.   (c) In text viewer :
  274.     F2 : Search string (case-sensitive).
  275.     F3 : Search string (case-insensitive).
  276.  
  277.  
  278.   (d) In contact sheet preview & Postscript preview :
  279.     '+' : Increase scaling factor.
  280.     '-' : Decrease scaling factor.
  281.     Ins,Del : Fine tune(Inc/Dec) scaling factor.
  282.  
  283.  
  284.   (e) In Slide show :
  285.      If the delay time is 0, the program will wait until you hit any key
  286.        (except ESCAPE).
  287.      'w' or 'W' : pause, any key to continue.
  288.      Up-Arrow   : Go back one image.
  289. +    ALT-D      : Mark current image as deletable. '-*-' is displayed at the
  290. +                 left-up screen corner.
  291. +    ALT-U      : Unmark current image.
  292.      Note:
  293.        Reverse slide show is slower.
  294. +      You must set 'delay time = 0' and 'not scroll' to use Up-Arrow and
  295. +        ALT-D/ALT-U.
  296. +      Before leaving slide show, if there are images marked as deletable,
  297. +        DISPLAY will ask you if you want to delete these images.
  298.  
  299.  
  300.   (f) In movie:
  301.      SPACE  : pause playing. If you press 'w' or 'W' at this time, DISPLAY
  302.        writes current frame to file. After writing, playback pauses at next 
  303.        frame.
  304.      ESCAPE : Terminate playing.
  305.  
  306.  
  307.  
  308. (6) Mouse Buttons
  309. =================
  310.  
  311.     MIDDLE button and CTRL-RIGHT button always mean ESCAPE.
  312.  
  313.    (a) in read/write menu:
  314.      single-click LEFT or RIGHT button = 'move select bar'.
  315.      double-click LEFT button  = RETURN.
  316.      double-click RIGHT button = SPACE.
  317.      CTRL-LEFT button = Tag.
  318.  
  319.    (b) in other text menus:
  320.      RIGHT button means SPACE.
  321.      single-click LEFT button = 'move select bar'.
  322.      double-click LEFT button = RETURN.
  323.  
  324.    (c) in contact sheet preview:
  325.      RIGHT = show/hide mouse cursor.
  326.      LEFT  = move an image piece if the mouse cursor is shown,
  327.              else leave graphics mode.
  328.      CTRL-LEFT = move contact sheet.
  329.  
  330.    (d) in image display screen:
  331.      RIGHT = show/hide mouse cursor.
  332.      LEFT  = move the image around the screen if the mouse cursor is shown,
  333.              else leave graphics mode.
  334.      CTRL-LEFT  = move one page.
  335.      SHIFT-LEFT = Pop out graphic menu.
  336.        You can move this box around screen by click and drag.
  337.      ALT-LEFT = define rectangle for cropping.
  338.        Releasing left button will crop image if ALT key is still pressed,
  339.        else do nothing.
  340.      CTRL-ALT-LEFT = toggle showing image coordinates.
  341.  
  342.    (e) in mode selection screen:
  343.      Click LEFT bottom at:
  344.        'Imag8' or 'Imag24' : change processing target.
  345.        '000 x 000 x 000' or '000 x 000' : change display type.
  346.        '<--' or '|||' : change linking status. (controlled by resource
  347.                         'auto_link_24_to_8').
  348.  
  349.    In some text regions the mouse cursor will change. Press the LEFT button
  350.    to accomplish that.
  351.  
  352.  
  353. (7) Initialization step
  354. =======================
  355.  
  356. The following is what happens when you start display. There's nothing
  357. you have to do, but it helps to avoid errors. The important thing is,
  358. that a command-line option overrides the configuration file option.
  359.  
  360.     1. Find allowed screen resolutions (for .grn video drivers only).
  361.     2. Read the configuration files (Global first, then Local).
  362.        Global: where DISPLAY.EXE resides. Local: where you start DISPLAY.
  363.        If you use '-f' command-line option, Global and Local config files
  364.        ignored. The specified file is used.
  365.     3. Process the command-line options (if any). So command-line options
  366.        override the configuration file.
  367.     4. Now, RUN.
  368.  
  369.  
  370.  
  371. (8) Detail
  372. ==========
  373.  
  374.                                GENERAL RULES
  375.  
  376. This section will describe the menus and options you can choose from. You can
  377. read through it or just start the program and play around. When you have
  378. a problem you can come back and read the section you need.
  379.  
  380. Most things are self-explanatory. Look for the comments behind a possible
  381. command. Also keep an eye at the first and last row of the screen: DISPLAY
  382. will tell you in most cases what is going on.
  383.  
  384. There are several fields with a special meaning (i.e. [ Auto Read ]). You
  385. can activate them by moving the cursor inside the marks and then click the
  386. left mouse button.
  387.  
  388. In any MENU you can call a pull-down-menu by pressing the F9 key or moving
  389. the cursor to the top-line and click a button.
  390.  
  391. The different functions can also be selected by using a hot-key.
  392.  
  393. Sometimes DISPLAY will ask you questions. You can answer them with a mouse
  394. click or by pressing the first (capital) letter of the answers
  395. (i.e. Y or y for yes).
  396.  
  397. Allowed operations are shown in white the others in grey (if you use the
  398. default colors).
  399.  
  400.  
  401. -----------------------------------------------------------------------------
  402.                               THE READ-MENU
  403. -----------------------------------------------------------------------------
  404.  
  405.  
  406. After starting DISPLAY, you will find yourself in the read-menu. You will see
  407. a file list of the directory you started DISPLAY from (or the directory you
  408. have specified with the -t command line option). Which file information you
  409. see, depends on your selection in the config.dis file. You can choose from
  410. different informations (including 4DOS description files).
  411. There are some marked fields you can use with the mouse. In the pull down
  412. menu-bar you will find 8 headers with a different number of options. Because
  413. all operations are accessible with short-cuts, that's the easiest way to call
  414. them. For some operations (i.e. slide show) you have to tag at least one file.
  415.  
  416. For Reading a file (image, movie) simply select one and press RETURN or double
  417. click with the left mouse button. Display will autodetect the correct format
  418. by itself. If you have problems try using the SPACE bar or double click with
  419. the right mouse button for selecting a format manually.
  420.  
  421. When image dimension is shown, '*' means that this image is 24-bit. percentage
  422. means the compression ratio(file size/image size). where image size is
  423. image_width * image_height * pixel_size(1 or 3).
  424.  
  425. There is a status line at the bottom of screen. 'preview' mean preview is on.
  426. 'gamma' means gamma correction is used. 'desc' means file descriptions are
  427. changed.
  428.  
  429.  
  430. 1. HELP
  431.  
  432.    Here you find some informations about display and it author. You can choose
  433.    the complete help (this file) and a short overview of key assignments.
  434.    Calling help will load the DISPLAY.DOC file. It contains help about possible
  435.    actions and a list of all short-cuts. There is also a description of the
  436.    meaning of the mouse buttons (be sure to check them out, because they
  437.    change, depending on the menu you use).
  438.    The second file is user defined, so you can write whatever you want. The
  439.    actual file brief.doc is just an example.
  440.  
  441. 2. FILE
  442.  
  443.    You have several options to manipulate files. You can delete, move, copy,
  444.    rename and view files. The options for shelling to DOS and quiting the
  445.    program are also located under this header. You can perform the actions on
  446.    a single file, a group of files, or the file currently under the marker.
  447.  
  448. 3. DIR
  449.  
  450.    From inside DISPLAY you can make directories. Another point is rereading
  451.    the current directory, for updating changes you have written to disk.
  452.  
  453. 4. OPERATION
  454.  
  455.    That's the menu with the real highlights of DISPLAY. Here you can choose
  456.    from the options: slide show, batch conversion, contact sheet, accumulate
  457.    quantization, and the special effects. Further you can display the fonts
  458.    comming with DISPLAY, show and write a already loaded image, and unpack
  459.    gl-files. You can also create a .flc movie. To do so, you must tag the
  460.    images (frames) and then select MAKE FLC.
  461.  
  462. 5. CHANGE
  463.  
  464.    Under this header you will find options to select the image type and
  465.    graphic resolution (for a list of possible modes for your graphic card
  466.    take a look at the status menu or type L). Other options are for changing
  467.    the working-drive and for editing the file mask (see match.doc).
  468.  
  469. 6. TAG
  470.  
  471.    Believe it or not this one is for tag and untag files (single, group, all).
  472.    I think that's all you must know.
  473.  
  474. 7. OPTION
  475.  
  476.    This menu point is for changing the defaults. Open the submenu and you
  477.    will see a number of fields, where you can change most parameters that
  478.    DISPLAY uses. You can activate them just for one run or make them the
  479.    default by saving a new config.dis. You can work with different configur
  480.    -ations, when you use different local config.dis files (i.e. make
  481.    directories for the users of your system, if there is more then one).
  482.    If you don't understand the meanings of parameters, please read config.dis.
  483.  
  484. 8. STATUS
  485.  
  486.    Here you can get informations about your graphic card, RAM, disk space,
  487.    and the formats of your image files.
  488.  
  489.  
  490.  
  491. -----------------------------------------------------------------------------
  492.                                 THE WRITE-MENU
  493. -----------------------------------------------------------------------------
  494.  
  495.  
  496. When you choose an option that will write changes to your disk, you will
  497. sometimes enter the write-menu (i.e. moving files). In the write menu you
  498. will find other marked fields for use with mouse. Although you will see the
  499. same headers in the pop-up-menu, most of the options are disabled. Also the
  500. most short-cuts won't help you. I think you will use this menu without
  501. problems, because it is very self-explanatory.
  502.  
  503.  
  504.  
  505. -----------------------------------------------------------------------------
  506.                                THE SCREEN-MENU
  507. -----------------------------------------------------------------------------
  508.  
  509.  
  510. Once you have loaded a picture, you will see the screen-menu (if you don't
  511. set the 'auto_display_image' to 1). It has a different look and pop-up-menu
  512. structure. If the loaded file is a movie, you will find yourself in another
  513. menu, which is optimized for the additional needed options you need to
  514. display movies.
  515.  
  516. The marked fields in the screen-menu are for viewing an image in the selected
  517. resolution or writing it to file. Further you can go back to the read-menu or
  518. exit the program. On the left you see three bigger fields. They are for those
  519. of you, who are using a mouse and don't want to use the keyboard for pressing
  520. the return, space, or esc keys.
  521.  
  522. The graphic modes you can choose from (to show the image) are in white, the
  523. others are grey.
  524.  
  525. Pressing F9 again will bring up the headers of the pop-up-menu. These have
  526. changed a little, compared to the read/write menu
  527.  
  528. 1. HELP
  529.  
  530.    Same as in read/write menu.
  531.  
  532. 2. FILE
  533.  
  534.    Only the exit option is still there, for the other things you have to go
  535.    back to the read/write menu.
  536.  
  537. 3. OPERATION
  538.  
  539.    Three options are now in the submenu. You can choose between special
  540.    effects, display fonts, and change processing target. The last option
  541.    means to change between palette images (most 8-bit images are of that
  542.    type) and RGB-pictures (truecolor, highcolor).
  543.  
  544. 4. OPTION
  545.  
  546.    Same as in read/write menu except for the preview option.
  547.  
  548. 5. STATUS
  549.  
  550.    The possible graphic and text mode are shown here (depends on your
  551.    hardware and the driver you use).
  552.  
  553. 6. UTIL
  554.  
  555.    What you find in this submenu are some often used operations from the
  556.    special effects menu (look there for a description of the comands).
  557.    Another way to manipulate your image is the pop-up menu in graphics
  558.    mode. There you can perform some effects without leaving the picture.
  559.  
  560.  
  561.  
  562.  (9) Special Effects
  563.  ===================
  564.  
  565. -----------------------------------------------------------------------------
  566.                              SPECIAL-EFFECTS-MENU
  567. -----------------------------------------------------------------------------
  568.  
  569. When you start manipulating your pictures you will at some point look in the
  570. special-effects-menu. The different effects are sorted in 6 groups. As
  571. mentioned above you can rotate, flip, resize, mix, and convert images.
  572. Most often other programs offer only some of the operations DISPLAY is able
  573. to perform. Some other effects DISPLAY performs are otherwise found in
  574. professional and expensive graphic packages only!
  575.  
  576. In this chapter you will find the complete list of possible effects with some
  577. short comments. The numbers are the same as in DISPLAY. If you want to make
  578. some of these effects the defaults for batch conversion please find the
  579. [Batch_Convert] section in config.dis and read the comment.
  580.  
  581. At the end of this section are some more detailed explanations of selected
  582. special effects (marked with an '*'), don't miss them !!
  583.  
  584.  
  585. Number          Operation                       Comment (if necessary)
  586.  
  587.  
  588. (01)-(01)       Flip Horizontal                 -
  589.  
  590. (01)-(02)       Flip Vertical                   -
  591.  
  592. (01)-(03)       Rotate Clockwise (90)           -
  593.  
  594. (01)-(04)       Rotate Counter-clockwise (90)   -
  595.  
  596. (01)-(05) *     Rotate/Shear image(any angle)   lets you rotate the image any
  597.                 (->24)                          angle you want. If you don't
  598.                                                 know what shearing means just
  599.                                                 do it. It's easier to look
  600.                                                 than to explain.
  601.  
  602.  
  603. (02)-(01) *     Resize image ( ->24 )           the resizing operation will
  604.                                                 promote the image to 24-bit
  605.                                                 if you smooth it. In the
  606.                                                 upcoming screen are some more
  607.                                                 options: You can change the
  608.                                                 size by pixel, by %, or
  609.                                                 resize different images to
  610.                                                 the same size (batch conver-
  611.                                                 sion)
  612.  
  613. (02)-(02)       Auto Crop                       cuts off "unused" pixel. Better
  614.                                                 use the online crobbing in
  615.                                                 graphic mode (Crtl-cursor).
  616.                                                 Useful for batch conversion
  617.  
  618. (02)-(03) *     Mix/Concat two images(->24)     overlay or put together two
  619.                                                 images with different options
  620.  
  621. (02)-(04) *     New Dimension                   Adjust the image dimension.
  622.                                                 Adding background or cropping
  623.                                                 if necessary.
  624.  
  625. (02)-(05)       Crop image only (any position)  cuts off parts of the image
  626.                                                 you can specify the position
  627.                                                 and the offset
  628.  
  629. (03)-(01)       Convert to Grayscale            -
  630.  
  631. (03)-(02)       Do B/W Dither                   try FS (Floyd-Steinberg) first
  632.  
  633. (03)-(03)       Pseudo Color                    do you like strange effects ?
  634.  
  635. (03)-(04) *     Color Quantization(24->8)       statistical should be first
  636.                                                 choice. It's good and fast.
  637.  
  638. (03)-(05)       Promote to 24-bits(8->24)       Will be done if needed, so you
  639.                                                 need this not often
  640.  
  641.  
  642. (04)-(01)       Histogram Equalize              enhance the contrast.
  643.  
  644. (04)-(02)       Smooth/Enhance Images(->24)     -
  645.  
  646. (04)-(03)       Edge Enhancement(->24)          find the image 'edge'.
  647.  
  648. (04)-(04)       Negate Image                    -
  649.  
  650. (04)-(05)       Oil paint(->24)                 ever wanted to be a painter ?
  651.  
  652. (04)-(06)       Gamma Correction                better use F1-F8 in graphic
  653.                                                 mode. Useful for batch convert
  654.  
  655. (04)-(07)       Cheesy Embossing(->24)          convert color to height-field
  656.  
  657. (04)-(08) *     Remove unused colors(8)         -
  658.  
  659. (04)-(09)       Swap R/G/B                      make some funny images !
  660.                                                 interesting for pseudo-colored
  661.                                                 images.
  662.  
  663. (04)-(10) *     General convolution             Do 3x3 matrix multiplication
  664.                                                 Try to understand the given
  665.                                                 expression (it's simpler than
  666.                                                 it looks).
  667.  
  668. (05)-(01)       Discard 24-bit image(24)        -
  669.  
  670. (05)-(02)       Discard 8-bit image(24)         -
  671.  
  672. (05)-(03)       Push image into stack           -
  673.  
  674. (05)-(04)       Pop image from stack            -
  675.                                        
  676. (05)-(05)       Clear stack                     -
  677.  
  678.  
  679. (06)-(01)       Load Palette Table              -
  680.  
  681. (06)-(02)       Save Palette Table              -
  682.  
  683. (06)-(03)       Display Palette Table           -
  684.  
  685. (06)-(04)       Push Palette Table              -
  686.  
  687. (06)-(05)       Pop Palette Table               -
  688.  
  689.  
  690. Detail Explanations of Special Effects
  691. --------------------------------------
  692.  
  693. DISPLAY can store both 8-bit and 24-bit images in memory. If 8-bit image
  694. presents, 'Imag8' is shown in the screen mode/resolution selection scren.
  695. Otherwise 'NULL8' is shown. For 24-bit image, 'Imag24' or 'NULL24' is shown.
  696. If 'Imag8' or 'NULL8' is highlighted, all special effects are performed on
  697. 8-bit image, which is called processing target. Of course, error message is
  698. shown, if there is no 8-bit image ('NULL8' is shown). In general DISPLAY can
  699. make the best decision for you. You can also use TAB key to change the
  700. processing target. The general rule is:
  701.  
  702.   The processing target is always the newly saved image.
  703.  
  704. If possible, DISPLAY keeps the target type. That is, after processing 8-bit
  705. image is still 8-bit. If it is not allowed, type tranformation occurs. For
  706. exmaple, 'Flip image' keeps the target type, while 'Quantization' converts
  707. 24-bit image to 8-bit image. The follow is the used symbols:
  708.     -> 24  : Result is always 24-bit image(with some exceptions).
  709.     -> 8   : Result is always 8-bit image.
  710.   8 -> 24  : This effect works on 8-bit image only and produces 24-bit image.
  711.   8        : This effect works on 8-bit image only. Image type is preserved.
  712.  
  713. Some effects(or called operations) are easy to understand. Just do it and
  714. see the result. Some are difficult to understand. Here I make the detail
  715. explanations of some effects.
  716.  
  717.  
  718. (01)-(05)                       Rotate/Shear image (any angle)(->24)
  719.   Antialias :                   The result looks more smooth.
  720.   Background R,G,B :            Used to fill the unused area in the result.
  721.  
  722. (02)-(01)                       Resize image (->24)
  723.   Image width, Image height :   You can use '%' to specify the percentage
  724.                                 relative to the original image domension.
  725.   Preserve aspect ratio :       DISPLAY keep the original width v.s. length
  726.                                 ratio in the result.
  727.   Smoothing :                   The result looks more smooth. If this
  728.                                 opation is off, image type is preserved.
  729.                                 Otherwise 24-bit image is produced.
  730.   Resize method (for batch) :   This option works for batch conversion only.
  731.     Absolute :                  Image is resized to the specified size.
  732.     Relative :                  Image is resized to the specified percentage
  733.                                 relative to the original image.
  734.     Bounded box :               Image is resized to the specified bound box
  735.                                 size. The result is always smaller than or
  736.                                 equal to the bound box. Use 'Preserve aspect
  737.                                 ratio' to control the aspect ratio.
  738.  
  739. (02)-(03)                       Mix/Concat two images (->24)
  740.                                 This is the only one effect that
  741.                                 works on two images.
  742.   Fore over Background(no w.) : Very simple. If the pixel in forground image
  743.                                 is BLACK(that is, pixel value is 0), it is
  744.                                 replaced by the corresponding pixel in
  745.                                 background image.
  746.   Background R,G,B :            Used to fill the unused area in the result.
  747.  
  748. (02)-(04)                       New Dimension
  749.                                 This effect doesn't resize image, just change
  750.                                 the image size. If the new size is smaller
  751.                                 than original size, cropping is performed.
  752.                                 Otherwise, unused area is filled with Back-
  753.                                 ground R,G,B.
  754.                                 For 24-bit image, the result is always 24-bit.
  755.                                 For 8-bit image, if number of colors is greater
  756.                                 than 256, the result is converted to 24-bit.
  757.  
  758. (03)-(04)                       Color Quantization (24->8)
  759.                                 This is the most complicated
  760.                                 operation in DISPLAY.
  761.                                 I recommend the 'Statistical' and
  762.                                 'Variance Based' methods.
  763.   Fixed 256 :                   Worse quality, fast, always 256 colors.
  764.   Median Cut :                  quality better the 'Fixed 256', slightly slow.
  765.   Median Cut(Better) :          The best quality of all, need LARGE memory,
  766.                                 slowest. I don't recommend you the method.
  767.   Grey 256 :                    Convert to grey, always 256 colors, fastest.
  768.   Variance Based :              Good quality, accetable time and memory
  769.                                 comsumption.
  770.   Statistical :                 Actually, I can hardly tell the difference
  771.                                 between this method and 'Variance Based'.
  772.   Current Palette :             Useful if you want to produce images that use
  773.                                 the same palette. Use 'display palette table'
  774.                                 to show current palette.
  775.   Ordered(fast) :               The fastest method for color quantization.
  776.                                 Don't need any additional memory.
  777.   Neural Net(256) :             Always 256 colors. The quality is controlled by
  778.                                 'neuquant_sample_factor' resource.
  779.  
  780.   
  781.  
  782. (04)-(08)                       Remove unused colors (8)
  783.                                 This effect trys to remove unused and
  784.                                 duplicated colors from 8-bit image.
  785.                                 It can decrease the number of colors.
  786.  
  787. (04)-(10)                       General convolution (-> 24)
  788.                                 I think that mathematical expression is
  789.                                 more clear:
  790.        _                             _            _           _
  791.       | (x-1,y-1) (x  ,y-1) (x+1,y-1) |          |  K0  K1  K2 |
  792.   A = | (x-1,y  ) (x  ,y  ) (x+1,y  ) | ,    B = |  K3  K4  K5 |
  793.       | (x-1,y+1) (x  ,y+1) (x+1,y+1) |          |  K6  K7  K8 |
  794.        -                             -            -           -
  795.   new pixel at (x,y) = (sum all A(i,j) * B(i,j)) / overall_divider
  796.  
  797.                                 For those without matrix knowledge:
  798.                                 Think of A as a picture.
  799.               1 1 1             The B matrix are the 9 values you can fill
  800.               1 1 1             in the Kernel fields. The multiplication of
  801.               1 1 1             two matrices (which must have the correct
  802.                                 row and column size) results in a single value.
  803.   R R R                         Now imagine that 'picture' A (3x3 pixel)
  804.   G G G    3xR+3xG+3xB          consists of colored lines (i.e. Red Green Blue)
  805.   B B B                         and all K-values in B equals '1'.
  806.                                 You'll get a new center pixel, which is bright
  807.   3 red + 3 green + 3 blue      white. If you set the overall divider to 50
  808.                                 the resulting pixel will be grey (dark white).
  809.                                 So as a result you will mix-up the colors of
  810.                                 your picture. The divider sets the brightness.
  811.  
  812.  
  813. (10) Tech. information
  814. ======================
  815.  
  816.   Program (user interface and some codecs) written by Jih-Shin Ho.
  817.   Some codecs are borrowed from XV (2.21) and PBMPLUS (Dec. 1991).
  818.   JPEG is based on the JPEG library(5) by the Independent JPEG Group.
  819.   Tiff is based on the Tiff library(3.2) from ftp.sgi.com.
  820.   DL is based on xdl.c & Xanim269.
  821.   FLI/FLC is based on the article in DDJ (Mar. 1993).
  822.   MPEG is based on Berkeley mpeg_play 2.0.
  823.   AVI(CRAM,CVID,ULTI) is based on Xanim269 by Mark Podlipec.
  824.   MPEG split is based on mpgsplit by Stefan Eckart.
  825.   Compiled with DJGPP.
  826.   All video drivers are borrowed from DJGPP and GRX.
  827.   You can get the whole DJGPP and GRX package from :
  828.     omnigate.clarkson.edu: /pub/msdos/djgpp
  829.     or Simtel mirror sites.
  830.  
  831.  
  832. (11) About the author
  833. =====================
  834.  
  835.   I am a student in National Chiao-Tung University, Taiwan, R.O.C.. Why do I 
  836. write DISPLAY ? Because I can't find any viewer in DOS world which can fulfill 
  837. my needs. I want to have a viewer for my personal use, so that I can do any 
  838. experiment I want to do. It is obvious that the easiest and best way is to
  839. write a viewer by myself.
  840.  
  841.   The first thing I think of is which compiler I should use. Turbo-C ? No, I
  842. don't want to bother with segment and offset any more. Watcom-C ? No, I don't
  843. have money to buy it. DJGPP ? YES, it is a 32-bit C compiler with good
  844. reliability becuase the engine is GNU C compiler. The most important reason is 
  845. that it is FREE.
  846.  
  847.   I develop DISPLAY on 486DX-33 with 16MB ram, So memory is not a problem. I
  848. decide to write program in UNIX style, because DJGPP emulates the UNIX
  849. environment. Thanks to the virtual memory function in DJGPP, I don't need to
  850. worry about the memory allocation. In the initial stage, I just write DISPLAY 
  851. for my persion use. Finally, I want to hear others' opinions, so I release it 
  852. to the Net. Many people give me suggesitons, encouragement and bug reports. 
  853. They all help to keep DISPLAY growing. The role of DISPLAY also changes from 
  854. plain viewer to multi-purpose viewer. Now DISPLAY is not just my program
  855. because it includes many ideas from the users.
  856.  
  857.   Finally, if you think that DISPLAY is good enough and would like to write a
  858. postcard to me, my physical address is :
  859.  
  860.   Room 1410, Graduate Student Dorm., National Chiao-Tung University,
  861.   Hsin-Chu 300, Taiwan, R.O.C.
  862.  
  863.  
  864. (12) Final
  865. ==========
  866.  
  867.    This document is not well written. If you have any PROBLEMS, SUGGESTIONS,
  868.    COMMENTS on this program, please send a mail to
  869.  
  870.            u7711501@bicmos.ee.nctu.edu.tw (140.113.11.13).
  871.               (There is NO anonymous ftp on this site.)
  872.  
  873.    I need your suggestions to improve this program.
  874.  
  875. Acknowledgments:
  876.   I should like to thank the authors of XV and PBMPLUS for their permission
  877.     to let me use their subroutines.
  878.   Also, I thank the authors of the TIFF and JPEG libraries.
  879.   Thank you DJ. Without DJGPP I can't do anything on a PC.
  880.   The author would like to thank Olivier Dumas, Ben Jos Walbeehm,
  881.     Bryan Woodworth and other users for their advice and suggestions.
  882.   The author would like to thank NCTUCCCA for offering a place for DISPLAY.
  883.  
  884.  
  885.                                             Jih-Shin Ho
  886.                                    u7711501@bicmos.ee.nctu.edu.tw
  887.